package com.gywj.race.service;

import com.gywj.race.config.exception.BaseException;
import com.gywj.race.entity.ApplicationRoles;
import com.gywj.race.entity.ApplicationRolesExample;
import com.gywj.race.mapper.ApplicationRolesMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * The type Application roles service.
 */
@Service
public class ApplicationRolesService {
    @Resource
    private ApplicationRolesMapper applicationRolesMapper;

    /**
     * 获取报名角色列表 下拉框
     *
     * @return the application roles list
     */
    public List<ApplicationRoles> getApplicationRolesList() {
        try {
            List<ApplicationRoles> applicationRoless = applicationRolesMapper.selectByExample(new ApplicationRolesExample());
            return applicationRoless;
        } catch (Exception e) {
            e.printStackTrace();
            throw new BaseException(e.getMessage());
        }
    }
}
